@extends('admin.layouts.application')
@section('css')
    <style>
        #img_show{
            margin-top: 35px;
        }
    </style>
@endsection
@section('content')
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-g">
                <div class="am-u-md-12">
                    <div class="am-panel am-panel-default">
                        <div class="am-panel-hd am-cf ">编辑客户信息</div>
                        <form class="am-form am-u-sm-8" action="{{route('admin.customer.update',$customers->id)}}" method="post">
                            {!! csrf_field() !!}
                            {!! method_field('put') !!}
                            客户ID<input class="am-form-field " type="text" name="id" value="{{$customers->id}}" placeholder="">
                            <br/>
                            客户名<input class="am-form-field" type="text" name="name" value="{{$customers->name}}" placeholder="">
                            <br/>
                            头像<input class="am-form-field" type="text" name="thumb" value="{{$customers->thumb}}" placeholder="">
                            <br/>
                            性别<input class="am-form-field" type="text" name="sex" value="{{$customers->sex}}" placeholder="">
                            <br/>
                            公司<input class="am-form-field" type="text" name="company" value="{{$customers->company}}" placeholder="">
                            <br/>
                            电话<input class="am-form-field" type="text" name="primary_tel" value="{{$customers->primary_tel}}" placeholder="">
                            <br/>
                            邮件<input class="am-form-field" type="text" name="email" value="{{$customers->email}}" placeholder="">
                            <br/>
                            通讯地址<input class="am-form-field" type="text" name="address" value="{{$customers->address}}" placeholder="">
                            <br/>
                            公司类型<input class="am-form-field" type="text" name="company_type" value="{{$customers->company_type}}" placeholder="">
                            <br/>
                            <button type="submit" class="am-btn am-btn-success" id="doc-prompt-toggle">确认提交</button>
                        </form>
                        <div class="am-u-sm-4 am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                用户头像
                            </div>


                            <div class="am-u-sm-8 am-u-md-8 am-u-end col-end">
                                <div class="am-form-group am-form-file new_thumb">
                                    <button type="button" class="am-btn am-btn-secondary am-btn-sm">
                                        <i class="am-icon-cloud-upload" id="loading"></i> 上传新的缩略图
                                    </button>
                                    <input type="file" id="thumb_upload">
                                </div>

                                <div class="select_thumb">
                                    <button type="button" class="am-btn am-btn-success am-btn-sm" id="ck_thumb_upload">
                                        <i class="am-icon-search-plus" id="loading"></i> 选择已存在的缩略图
                                    </button>
                                    <input type="hidden" name="thumb">
                                </div>
                                <div>
                                    <img src="" id="img_show" style="max-height: 200px;">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
@endsection
@section('js')

    <script src="/assets/js/jquery.html5-fileupload.js"></script>
    <script src="/assets/js/upload.js"></script>
    <script src="/assets/vendor/ckfinder/ckfinder.js"></script>
    <script src="/assets/js/ck_upload.js"></script>

@endsection